import service from '@/utils/request';

const prefix = '/sysUser';
export function sysUserLogin(data) {
  return service({
    url: `${prefix}/login`,
    method: 'post',
    data
  });
}

export function getUserInfoService() {
  return service({
    url: `${prefix}/info`,
    method: 'get',
  });
}

export function getUserDetailByIdService(userId) {
  return service({
    url: `${prefix}/detail`,
    method: 'get',
    params: { userId },
  });
}


export function updateUserInfoService(data) {
  return service({
    url: `${prefix}/update`,
    method: 'put',
    data
  });
}

export function logoutService() {
  return service({
    url: `${prefix}/logout`,
    method: 'delete',
  });
}